#ifndef __TEST_OBJECT_H__
#define __TEST_OBJECT_H__

#define TYPE_POINT          (point_get_type())
#define POINT(p)            (IM_TYPE_INSTANCE_CHECK_CAST((p),TYPE_POINT,Point))
#define CONST_POINT(p)      (IM_TYPE_INSTANCE_CHECK_CAST_CONST((p),TYPE_POINT,Point))
#define POINT_CLASS(c)      (IM_TYPE_CLASS_CHECK_CAST((c),TYPE_POINT,PointClass))
#define IS_POINT(p)         (IM_TYPE_INSTANCE_CHECK_TYPE((p),TYPE_POINT))
#define IS_POINT_CLASS(c)   (IM_TYPE_CLASS_CHECK_TYPE((c),TYPE_POINT))
#define POINT_GET_CLASS(p)  (IM_TYPE_INSTANCE_GET_CLASS_CAST((p),TYPE_POINT,PointClass))

#define TYPE_CIRCLE         (circle_get_type())
#define CIRCLE(p)           (IM_TYPE_INSTANCE_CHECK_CAST((p),TYPE_CIRCLE,Circle))
#define CONST_CIRCLE(p)     (IM_TYPE_INSTANCE_CHECK_CAST_CONST((p),TYPE_CIRCLE,Circle))
#define CIRCLE_CLASS(c)     (IM_TYPE_CLASS_CHECK_CAST((c),TYPE_CIRCLE,CircleClass))
#define IS_CIRCLE(p)        (IM_TYPE_INSTANCE_CHECK_TYPE((p),TYPE_CIRCLE))
#define IS_CIRCLE_CLASS(c)  (IM_TYPE_CLASS_CHECK_TYPE((c),TYPE_CIRCLE))
#define CIRCLE_GET_CLASS(p) (IM_TYPE_INSTANCE_GET_CLASS_CAST((p),TYPE_CIRCLE,CircleClass))

typedef struct _Point       Point;
typedef struct _PointClass  PointClass;
typedef struct _Circle      Circle;
typedef struct _CircleClass CircleClass;

struct _Point
{
    IMObject object;

    int x;
    int y;
};

struct _PointClass
{
    IMObjectClass parent_class;

    void    (*move_to)  (Point *point, int x, int y);
    void    (*draw)     (Point *point);
};

struct _Circle
{
    Point point;

    int radius;
};

struct _CircleClass
{
    PointClass parent_class;

    void    (*resize)   (Circle *circle, int radius);
};

IMType      point_get_type      ();
Point*      point_new           (int x, int y);
void        point_move_to       (Point *point, int x, int y);
void        point_draw          (Point *point);
int         point_get_x         (Point *point);
int         point_get_y         (Point *point);

IMType      circle_get_type     ();
Circle*     circle_new          (int x, int y, int radius);
void        circle_resize       (Circle *circle, int radius);
int         circle_get_radius   (Circle *circle);

#endif

/*
vi:ts=4:nowrap:ai:expandtab
*/
